package com.attendance.entity.dto;

import java.util.Date;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.format.annotation.DateTimeFormat;

import com.attendance.entity.Absence;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.institute.entity.Institute;
import com.staff.entity.Staff;

public class AbsenceDTO {
	private Long id;
	private String staffName;
	private String staffNum;
	private String department;
	private Date clockInTime;
	private float totalTime;
	
	public AbsenceDTO(Staff staff,Absence absence,String dept) {
		super();
		this.id = absence.getId();
		this.staffName = staff.getStaffName();
		this.staffNum = staff.getStaffNum();
		this.department = dept;
		this.clockInTime = absence.getClockInTime();
		this.totalTime = absence.getTotalTime();
	}
	public AbsenceDTO() {
		super();
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getStaffName() {
		return staffName;
	}
	public void setStaffName(String staffName) {
		this.staffName = staffName;
	}
	public String getStaffNum() {
		return staffNum;
	}
	public void setStaffNum(String staffNum) {
		this.staffNum = staffNum;
	}
	public String getDepartment() {
		return department;
	}
	public void setDepartment(String department) {
		this.department = department;
	}
	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
	public Date getClockInTime() {
		return clockInTime;
	}
	public void setClockInTime(Date clockInTime) {
		this.clockInTime = clockInTime;
	}
	public float getTotalTime() {
		return totalTime;
	}
	public void setTotalTime(float totalTime) {
		this.totalTime = totalTime;
	}
	
}
